package com.dc.ai.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dc.ai.entity.dto.UserAuthInfo;
import com.dc.ai.entity.form.ForgetPasswordForm;
import com.dc.ai.entity.form.UserForm;
import com.dc.ai.entity.form.UserInfoForm;
import com.dc.ai.entity.po.LoginResult;
import com.dc.ai.entity.po.SysUser;

public interface SysUserService extends IService<SysUser> {

    /**
     * 根据用户名获取认证信息
     *
     * @param username 用户名
     * @return {@link UserAuthInfo}
     */

    UserAuthInfo getUserAuthInfo(String username);

    /**
     * 保存用户
     * @param userForm
     * @return
     */
    boolean saveUser(UserForm userForm);

    /**
     * 修改用户
     * @param userInfoForm
     * @return
     */
    boolean updateUser(UserInfoForm userInfoForm);

    /**
     * 删除用户
     * @param userId
     */
    boolean removeUser(String userId);

    /**
     * 忘记密码
     * @param forgetPasswordForm
     * @return
     */
    boolean forgetPassword(ForgetPasswordForm forgetPasswordForm);

    /**
     * 设置密码
     * @param userId
     * @param password
     * @return
     */
    boolean setPassword(String userId, String password);
}
